
<!--
	user list !
-->
<h3>{{rootColumnName}}
    <small>{{rootColumnPrompt}}</small>
</h3>
<div  ng-controller="studySituationCtrl" class="panel panel-default">
    <div class="panel-heading" style="border-bottom:1px solid #dcdcdc;margin-bottom:10px;">
        <form class="form-inline">
            <div class="form-group">
                <div class="col-sm-6 no_line form-group">
                    <label  style="margin-top:10px;"  for="finalBeginDate" class="date_label col-sm-4 control-label">开始日期</label>
                    <p class="input-group col-sm-8">
                        <input id="finalBeginDate" type="text" datepicker-popup="{{format}}" ng-model="finalBeginDate.date" is-open="finalBeginDate.opened" min-date="minDate"  ng-change="dataChange()" datepicker-options="dateOptions" ng-required="true" close-text="Close" class="form-control" />
                     <span class="input-group-btn">
                             <button style="height:35px"  type="button" ng-click="openFinalBeginDate($event)" class="btn btn-default">
                                 <em class="fa fa-calendar"></em>
                             </button>
                          </span>
                    </p>
                </div>
                <div class="col-sm-6 no_line form-group">
                    <label  style="margin-top:10px;"  for="finalEndDate" class="date_label col-sm-4 control-label">结束日期</label>
                    <p class="input-group col-sm-8" >
                        <input id="finalEndDate"  type="text" datepicker-popup="{{format}}" ng-model="finalEndDate.date" is-open="finalEndDate.opened" min-date="finalBeginDate.date" max-date="dt"  ng-change="dataChange()" datepicker-options="dateOptions" ng-required="true" close-text="Close" class="form-control" />
                     <span class="input-group-btn">
                       <button style="height:35px"  type="button" ng-click="openFinalEndDate($event)" class="btn btn-default">
                           <em class="fa fa-calendar"></em>
                       </button>
                    </span>
                    </p>
                </div>
            </div>
        </form>
        <form style="margin:10px 0;" class="form-inline">
            <div class="col-sm-4 no_line form-group">
                <label for="" style="margin-right: 30px">产品id/产品标题</label>
                <input type="text" ng-keyup="dataEvent($event)" ng-change="dataChange()" ng-model="productId" class="form-control" placeholder="{{searchplaceholder}}">
            </div>
            <div class="form-group">
                <select style="margin-left: 15px" class="custom-css form-control"  ng-model="buySelectValue" ng-change="dataChange()" ng-options="buySelectValue._value_ for buySelectValue in buyType" >
                </select>
            </div>
        </form>
    </div>
    <div class="panel-body " ng-class="loading?'whirl standard':'' " style="border-top: 1px solid #CFDBE2;">
        <table class="table table-striped table-condensed">
            <thead>
            <tr>
                <th>节数</th>
                <th>课程标题</th>
                <th>平均学习时长（分钟）</th>
                <th>日课时长（分钟）</th>
                <th>听课比例</th>
                <th>总学习时长（小时）</th>
                <th>点击次数（UV）</th>
                <th>点击次数（PV）</th>
            </tr>
            </thead>
            <tbody>
            <!-- repeat begin -->
                <tr ng-repeat="list in lists track by $index">
                    <td>{{$index+1}}</td>
                    <td>{{list.title}}</td>
                    <td>{{(list.avgDuration/60|underNum)<10?'0'+(list.avgDuration/60|underNum):(list.avgDuration/60|underNum)}}:{{(list.avgDuration%60|number:0)<10?'0'+(list.avgDuration%60|number:0):(list.avgDuration%60|number:0)}}</td>
                    <td>{{(list.duration/60|underNum)<10?'0'+(list.duration/60|underNum):(list.duration/60|underNum)}}:{{(list.duration%60|number:0)<10?'0'+(list.duration%60|number:0):(list.duration%60|number:0)}}</td>
                    <td>{{list.durationProportion}}</td>
                    <td>{{list.sumDuration/3600|number:1}}</td>
                    <td>{{list.clickUV}}</td>
                    <td>{{list.clickPV}}</td>
                </tr>
                <!-- repeat end -->
                <tr>
                    <td>总计</td>
                    <td></td>
                    <td></td>
                    <!-- 下取整underNum-->
                    <td>{{(durations/60|underNum)<10?'0'+(durations/60|underNum):(durations/60|underNum)}}:{{(durations%60|number:0)<10?'0'+(durations%60|number:0):(durations%60|number:0)}}</td>
                    <td>{{(100*avgDurations/durations)|number:2}}%</td>
                    <td>{{sumDurations/3600|number:1}}</td>
                    <td>{{clickUVs}}</td>
                    <td>{{clickPVs}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>